<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>售后服务列表</title>
    <#include "/view/admin/head.html"/>
<script type="text/javascript"
	src="${base}/jstool/layer/layer.js"></script>
    <script type="text/javascript">

        $(function() {
            //初始化
        });
    </script>
</head>
<style type="text/css">
    .table-class{
        width:99%;
        text-align: center;
        border:1px solid #afd9ee;
        margin:0 auto;
        margin-top: 10px;
    }
    .list-path{
        height: 50px;
        line-height: 50px;
        background-color: #9acfea;

    }
    table th{
        text-align: center;
        WORD-WRAP: break-word;
        width: 100px;
    }

    table td{
        text-align: center;
    }

    .table-query{
        /*height: 40px;*/
        /*width:80px;*/
        /*text-align: center;*/
        white-space:nowrap;
        /*position: relative;*/
        float: left;
        display:inherit;
        /*display: inline;*/


    }
    .table-head{
        background-color: #9acfea;
    }
    .label-head{
        height: 20px;
        width: 100%;
    }
    .bs-example .input-group{
        width:300px;
        float: left;
        margin-top:20px;

    }
    .bank-label{
        width:25px;
        float: left;
    }
    .label-hidden{
        display: none;
    }
    .panel-body{
        padding-top: 0px;
    }
    .input-group input[type='text']{
        z-index: inherit;
    }


</style>
<body>

<div class="list-path" > <span style="margin-left: 50px;"><span class="glyphicon glyphicon-home"></span>
 商品管理/下一步

</span></div>
<hr/>


    <table class="table table-hover table-list table-bordered">
        <thead>
        <tr>
            <td class="table-head-btn">
                <div style="text-align:left;margin-left: 50px;">
                  <a href="#" onclick="doSvse('${commodityId!}')" class="btn btn-primary">新增</a>
                </div>
            </td>
        </tr>
        <tr class="table-head">
                <th class="label-hidden">主键</th>
                <th  class="label-hidden">商品</th>
            <th>售后服务名称</th>
            <th>售后服务内容</th>
            <th>排序</th>

            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <#list list as c>
            <tr>
                        <td class="label-hidden">${c.aftersalesId!}</td>
                            <td class="label-hidden">${c.commodityId!}</td>
                            <td>${c.name!}</td>
                            <td>${c.value!}</td>
                            <td>${c.orderByno!}</td>
                <td>
                    <a href="#" onclick="doUpdate('${c.aftersalesId!}','${commodityId!}')" class="btn btn-primary">修改</a>
                    <a href="javascript:checkDelete('${base}/busin/deleteafter.do?aftersalesId=${c.aftersalesId!}&commodityId=${commodityId}')" class="btn btn-primary">删除</a>
                </td>
            </tr>

        </#list>
          <tr>
            <td colspan="4" width="100%" style="text-align: center;">
               
                 <a class="btn btn-success " href="${base}/busin/czjspecificationAdd?commodityId=${commodityId!}">
                <span style="width: 20px;">&nbsp;</span>
                   </span>上一步</a>
              <a class="btn btn-success " href="${base}/busin/list">
                <span style="width: 20px;">&nbsp;</span>
                   </span>完成</a>
            </td>
        </tr>
        </tbody>
    </table>


</div>
<script>

function doSvse(commodityId){
	
	layer.open({
        type: 2,
        skin: 'layui-layer-lan',
        title: '标题',
        shadeClose: true,
        maxmin: true,
        shade: 0.8,
        area: ['800px', '850px'],
        offset: ['50px', '150px'],
        content: '${base}/busin/czjaftersalesAdd?commodityId='+commodityId,
        /* end: function () {           //关闭弹出层触发
           location.reload();       //刷新父界面，可改为其他
        } */

    });
	
	
}



function doUpdate(specificationId,commodityId){
	
	layer.open({
        type: 2,
        skin: 'layui-layer-lan',
        title: '标题',
        shadeClose: true,
        maxmin: true,
        shade: 0.8,
        area: ['800px', '850px'],
        offset: ['50px', '150px'],
        content: '${base}/busin/czjaftersalesAdd?commodityId='+commodityId+"&aftersalesId="+specificationId,
        /* end: function () {           //关闭弹出层触发
           location.reload();       //刷新父界面，可改为其他
        } */

    });
	
	
}
function checkDelete(url){
    if (window.confirm("确认删除吗?")) {
        location.href=url;
    }
}

</script>

</body>
</html>
